import { fileURLToPath } from "url";
import { dirname } from "path";
export function $dirname(url: string) {
  if (!url) return ""; // 如果没有传入url，则返回空字符串
  const __filename = fileURLToPath(url);
  const __dirname = dirname(__filename);
  return __dirname;
}
